﻿using Calico.Server.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;

namespace Calico.Server
{
	public class WebApiConfig
	{
		public static void Register(HttpConfiguration config)
		{
			// Require authorization
			config.Filters.Add(new AuthorizedUserAttribute());

			// Web API Route
			config.Routes.MapHttpRoute(
				name: "DefaultRoute",
				routeTemplate: "{controller}/{action}",
				defaults: new { controller = "v1", action = "Status" }
			);
		}
	}
}